Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating the node operator guide #231

Merged
merged 29 commits into from
Sep 4, 2023
Merged

Updating the node operator guide #231

merged 29 commits into from
Sep 4, 2023

Conversation

vishalchangrani
Copy link
Contributor

@vishalchangrani vishalchangrani commented Aug 29, 2023

This PR updates the node operator to make the Flow node nomenclature closer to Ethereum to allow folks from the Ethereum community to be able to easily understand the different Flow node types.

  • Changes observer to Light Client. Light Node (based on explanation from Alex)
  • Introduces the concept of Full node, which is any Flow staked node.
  • Classified SN,LN,EN and VN as validator node (under Full node)
    The mental model I had is:

Flownodes diagram

(Flow.com will have additional changes to describe how run a node at a much higher level with a call to action pointing to this page)

@vercel
Copy link

vercel bot commented Aug 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 1, 2023 10:51pm

@vishalchangrani vishalchangrani changed the title adding full node to the node operator guide Updating the node operator guide Aug 30, 2023
@AlexHentschel
Copy link
Member

AlexHentschel commented Aug 30, 2023

I would suggest to reference the observer node as "Light Node" (not "light client").

To the best of my knowledge, there is no properly defined terminology. However, in the context of Flow, there is an important differentiation between what I call a light node vs a light client:

Light Node (previously called Observer)

  • The light nodes are designed to be continuously online and:
    • observes consensus, by downloading and indexing the blocks (though not the execution state)
    • locally store a continuous history of blocks (the history doesn't need to go back to genesis, but they are generally keeping a longer history of blocks)
    • locally validate that consensus rules are followed
  • The important aspect detail is: observers only work if they have a continuous history of blocks. They can be offline, but have to catch up before they can answer queries about recent blocks.
  • It can (but doesn't have to) replicate some of the execution state, store it locally, index the replicated part of the state.
  • To run a Light Node, you need a dedicated computer (maybe only laptop-grade hardware, but at least that depending on how much execution state you want to store locally and how compute-intensive your state queries are) which should be continuously online.
  • Reasons people might want to run an observer:
    • they care about more than a few accounts
    • they want to execute frequent and complex state queries, where it is more efficient to replicate some of the execution state (with a limited history) locally, validate its integrity once and then work with the local (already validated) state data
    • low latency of state and event queries
    • enterprise-level security or reporting requirements (e.g. exchanges, professional investors, governments, etc)

From a software perspective, the Light Node is quite similar to the archive node (store and index blocks, store and index execution state), except that is does not exhaustively replicate the entire execution state and does not commit to keeping a super-long history .

Light Client

  • We are architecting light clients to run on embedded hardware (phones, raspberry Pi, smart-home devices and high-end spectrum of micro controllers). These either do not have the hardware resources (in the case of micro controllers), or the user does not want to expend the hardware resources (e.g. phones) to continuously follow the blocks and index them.
  • A light client achieves this by not validating consensus on a continuous basis, but instead receiving consistency proofs that a supermajority of consensus nodes have committed the respective data.
  • Light clients are safe. Just that they won't be able to notice some attacks on the network that observers would be able to detect. So in a sense, Light clients do not really contribute to network safety, observers contribute a bit (they validate consensus), and full nodes contribute a lot (validate consensus and secure the network additionally through their role-specific tasks)
  • Light Clients are designed to only store negligible amounts of execution state locally. Essentially all data is fetched on demand (integrity cryptographically validated locally).
  • Light Clients are designed for the consumer
    • with a few accounts
    • largely interested about changes of these accounts
    • does not want to run a client continuously
    • can wait some seconds (maybe a minute when the client was offline for weeks) until most recent state of their accounts has been loaded
    • does not want to keep long history (via their light client)
    • does not want to run dedicated hardware to trustlessly interact with the chain

More details on light clients:

Context:

  • While light clients are not here yet, we are working towards them. So I think we should shape our terminology such that we have a term for them.

@@ -1,25 +1,25 @@
---
title: Observer Node
sidebar_label: Observer Node
title: Light Client a.k.a Observer Node
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see preview here

@@ -20,15 +20,32 @@ Flow multirole architecture makes it more scalable and provides several node typ

The different types of nodes are described [here](./node-roles.mdx). As node operator, you can choose to run any of the different types of node that best fits your needs.

### Observer node
The observer node is one of the easiest node to spin up and can be run by Dapp developers who need the latest block data available locally e.g. a wallet application that needs to track the latest block ID and height.
## Light client a.k.a. Observer node
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see a preview of this page here

@vishalchangrani
Copy link
Contributor Author

I would suggest to reference the observer node as "Light Node" (not "light client").

To the best of my knowledge, there is no properly defined terminology. However, in the context of Flow, there is an important differentiation between what I call a light node vs a light client:

Light Node (previously called Observer)

  • The light nodes are designed to be continuously online and:

    • observes consensus, by downloading and indexing the blocks (though not the execution state)
    • locally store a continuous history of blocks (the history doesn't need to go back to genesis, but they are generally keeping a longer history of blocks)
    • locally validate that consensus rules are followed
  • The important aspect detail is: observers only work if they have a continuous history of blocks. They can be offline, but have to catch up before they can answer queries about recent blocks.

  • It can (but doesn't have to) replicate some of the execution state, store it locally, index the replicated part of the state.

  • To run a Light Node, you need a dedicated computer (maybe only laptop-grade hardware, but at least that depending on how much execution state you want to store locally and how compute-intensive your state queries are) which should be continuously online.

  • Reasons people might want to run an observer:

    • they care about more than a few accounts
    • they want to execute frequent and complex state queries, where it is more efficient to replicate some of the execution state (with a limited history) locally, validate its integrity once and then work with the local (already validated) state data
    • low latency of state and event queries
    • enterprise-level security or reporting requirements (e.g. exchanges, professional investors, governments, etc)

From a software perspective, the Light Node is quite similar to the archive node (store and index blocks, store and index execution state), except that is does not exhaustively replicate the entire execution state and does not commit to keeping a super-long history .

Light Client

  • We are architecting light clients to run on embedded hardware (phones, raspberry Pi, smart-home devices and high-end spectrum of micro controllers). These either do not have the hardware resources (in the case of micro controllers), or the user does not want to expend the hardware resources (e.g. phones) to continuously follow the blocks and index them.

  • A light client achieves this by not validating consensus on a continuous basis, but instead receiving consistency proofs that a supermajority of consensus nodes have committed the respective data.

  • Light clients are safe. Just that they won't be able to notice some attacks on the network that observers would be able to detect. So in a sense, Light clients do not really contribute to network safety, observers contribute a bit (they validate consensus), and full nodes contribute a lot (validate consensus and secure the network additionally through their role-specific tasks)

  • Light Clients are designed to only store negligible amounts of execution state locally. Essentially all data is fetched on demand (integrity cryptographically validated locally).

  • Light Clients are designed for the consumer

    • with a few accounts
    • largely interested about changes of these accounts
    • does not want to run a client continuously
    • can wait some seconds (maybe a minute when the client was offline for weeks) until most recent state of their accounts has been loaded
    • does not want to keep long history (via their light client)
    • does not want to run dedicated hardware to trustlessly interact with the chain

More details on light clients:

Context:

  • While light clients are not here yet, we are working towards them. So I think we should shape our terminology such that we have a term for them.

❤️ thank you for this explanation - will change Light Client to Light Node

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What so you think about the following revision of line 52, which currently reads:

An access node is staked but since it does not participate in the core Flow protocol, it does not receive any staking rewards.

I would suggest to revise this to (edits highlighted in bold):

An access node is minimally staked for network security. Nevertheless, the central goal for Access Nodes is to provide functionality to its node operator. In comparison, contributing to protocol progress (e.g. routing transactions to collector clusters, relaying blocks to the unstaked peer-to-peer network, etc.) should only take up a marginal fraction an Access Node's computational resources. Furthermore, Access Node operators can freely rate-limit the amount of resources their Access Node dedicates to supporting the broader ecosystem. Therefore, Access Nodes do not receive staking rewards.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made that change

Copy link
Member

@AlexHentschel AlexHentschel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few more wording suggestions. Nothing major. Thanks for the update! Nice work 👏

@@ -1,25 +1,25 @@
---
title: Observer Node
sidebar_label: Observer Node
title: Light Client a.k.a Observer Node
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still using term "Light client" in this doc

Copy link
Contributor

@peterargue peterargue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed a couple small typos, but otherwise it looks good

docs/building-on-flow/nodes/node-operation/index.md Outdated Show resolved Hide resolved
docs/building-on-flow/nodes/node-operation/index.md Outdated Show resolved Hide resolved
docs/building-on-flow/nodes/node-operation/index.md Outdated Show resolved Hide resolved
@vishalchangrani
Copy link
Contributor Author

@AlexHentschel @peterargue - Just wanted to call out - I am intentionally avoiding the phrase light node previously known as observer node and instead saying light node a.k.a. observer node since the word observer node is far too prevalent in our documentation, past communications and even in the docker image.
Forcing a rename now will just lead to a lot of confusion.

@vishalchangrani vishalchangrani merged commit 6a00297 into main Sep 4, 2023
2 checks passed
@vishalchangrani vishalchangrani deleted the vishal/node_changes branch September 4, 2023 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants